by Fungus (1 Submission)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Fri 22nd October 1999
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Extracts file path our of filename. E.G c:\temp\setup.exe returns c:\temp usage: Dim x as Long x = GetFilePath(filename)
Dim x As String
Dim position As Integer
Dim y As Integer
Dim myPath As String
x = filename
For y = Len(x) To 1 Step -1
If Mid(x, y, 1) = "\" Then
position = y - 1
Exit For
End If
Next y
myPath = Left(x, position)
GetFilePath = Format(myPath)
End Function
No comments have been posted about Extracts file path our of filename. E.G c:\temp\setup.exe returns c:\temp usage: Dim x as Long x = . Why not be the first to post a comment about Extracts file path our of filename. E.G c:\temp\setup.exe returns c:\temp usage: Dim x as Long x = .